package com.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.sun.org.apache.bcel.internal.generic.NEW;

public class FileNameUtil {
	
	
		/*
		* 获取后缀名
		*/
		
		public static String imageupload(String fileName,String bagName) {
			int pos = fileName.lastIndexOf(".");
			bagName=bagName+fileName.substring(pos);
			return bagName;
		}
		
		public static String fileName(){
			SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd_hh-mm-ssSSS_");
			String fileName = sdf.format(new Date())+RandomUtil.getRandom(4);
			return fileName;
		}
		
		
	}


